#include "adjustsimdialog.h"
#include "ui_adjustsimdialog.h"
#include <QDebug>
AdjustSimDialog::AdjustSimDialog(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::AdjustSimDialog)
{
    ui->setupUi(this);
    ui->comboBox->addItem("关节1",1);
    ui->comboBox->addItem("关节2",2);
    ui->comboBox->addItem("关节3",3);
    ui->comboBox->addItem("关节4",4);
    ui->comboBox->addItem("关节5",5);
    ui->comboBox_2->addItem("正向",1);
    ui->comboBox_2->addItem("反向",-1);
}

AdjustSimDialog::~AdjustSimDialog()
{
    delete ui;
}



void AdjustSimDialog::on_pushButton_clicked()
{
    emit this->on_change_x_position(static_cast<uint16_t>(ui->comboBox->currentData(Qt::UserRole).toUInt()),
                                     ui->comboBox_2->currentData(Qt::UserRole).toFloat());
}

void AdjustSimDialog::on_pushButton_11_clicked()
{
    emit this->on_change_y_position(static_cast<uint16_t>(ui->comboBox->currentData(Qt::UserRole).toUInt()),
                                     ui->comboBox_2->currentData(Qt::UserRole).toFloat());
}

void AdjustSimDialog::on_pushButton_6_clicked()
{
    emit this->on_change_z_position(static_cast<uint16_t>(ui->comboBox->currentData(Qt::UserRole).toUInt()),
                                     ui->comboBox_2->currentData(Qt::UserRole).toFloat());
}
